home *** CD-ROM | disk | FTP | other *** search
/ Freelog 55 / Freelog055.iso / Bas / Musique / EasyAlbum / easyam_setup.exe / {app} / export_sql.tpt < prev    next >
Text File  |  2003-11-17  |  774b  |  26 lines

  1. @# SQL file(*.sql)|*.sql
  2. @set(i,0)\
  3. @set(over, @size(albums))\
  4. @foreach album (albums) {\
  5. @set(id,i+1)\
  6. INSERT INTO albums (id_album, artist, album, genre, year, playlistpath, coverpath) VALUES (\
  7. ${id} ,\
  8. \"@replace(album.artist,"\"","\"\"")\", \
  9. \"@replace(album.album,"\"","\"\"")\", \
  10. \"@replace(album.genre,"\"","\"\"")\", \
  11. \"@replace(album.year,"\"","\"\"")\", \
  12. \"@replace(album.playlistpath,"\"","\"\"")\", \
  13. \"@replace(album.coverpath,"\"","\"\"")\" );
  14. @set(j,1)\
  15. @foreach track(album.tracks) {\
  16. INSERT INTO tracks (id_album, tracknum, title, trackpath) VALUES (\
  17. ${id} ,\
  18. ${j} ,\
  19. \"@replace(track.title,"\"","\"\"")\", \
  20. \"@replace(track.trackpath,"\"","\"\"")\" );
  21. @set(j,j+1)\
  22. }\
  23. @progress(i,over)\
  24. @set(i,i+1)\
  25. }\
  26. @progress(over,over)\